<template>
    <div>
        <AddPictureSingleSz />
        <AddPictureMultiSz />
        <!-- <JustPictureSz /> -->
        <FissionPictureSz />
        <FissionRecordPicture />
        <ViewPictureInfo />
        <AddPictureSz />
        <AddSchedTag :taglist="tag_list" ref="tagRef" />
        <EditPictureSz />
        <EditPictureBase ref="baseRef" />
        <div class="com_box">
            <div class="sch_head flexbox flexcenter flexbetween">
                <div class="flexbox flexcenter">
                    <div class="sch_tab" @click="switchTab('/demandszv2')">需求汇集</div>
                    <div class="sch_tab" @click="switchTab('/videoszlistv2')">视频</div>
                    <div class="sch_tab active">图片</div>
                </div>
                <div class="flexbox flexcenter">
                    <el-radio-group v-model="queryInfo.date_defined" @change="getDataList(1)" size="small">
                        <el-radio-button :label="0">按周选</el-radio-button>
                        <el-radio-button :label="1">
                            <el-tooltip class="item" effect="dark" content="" placement="bottom">
                                <div slot="content" style="font-size:12;color:#fff;line-height:18px;width:350px">
                                    指定日期筛选将会根据素材上传的时间进行时间范围筛选,
                                    如选择2022/12/01-2022/12/31,将筛选出有在该日期范围内上传素材的需求。
                                </div>
                                <span>指定日期</span>
                            </el-tooltip>
                        </el-radio-button>
                    </el-radio-group>
                    <el-date-picker size="small" key="week" v-if="queryInfo.date_defined==0" v-model="yearData" @change="getData()" style="width:220px;margin-left:10px" :clearable='false' type="week" :picker-options="{firstDayOfWeek:1}" format="yyyy 年 MM 月 第 WW 周" placeholder="选择周">
                    </el-date-picker>
                    <el-date-picker key="mouth" v-if="queryInfo.date_defined==1" style="width:220px;margin-left:10px" value-format="yyyy-MM-dd" v-model="queryInfo.date" type="daterange" clearable size="small" @change="getDataList(1)" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期">
                    </el-date-picker>
                    <el-button plain size="small" icon="el-icon-circle-plus-outline" style="margin-left:12px" @click="addPictureMultiSz">多需求</el-button>
                    <el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:12px" @click="addPictureSingleSz">单需求</el-button>
                </div>
            </div>
            <div class="sch_rank">
                <div class="flexbox flexcenter flexbetween">
                    <div class="flexbox flexcenter">
                        <!-- <el-dropdown :hide-on-click="false" trigger="click" placement='bottom'>
                            <div class="flexbox flexcenter drop_box">
                                <img src="../../assets/img/saixuan.svg" alt="">
                                <span class="drop_title">{{queryInfo.onlyme==0?'全部':'分配给我的'}}</span>
                                <span class="el-icon-caret-bottom"></span>
                            </div>
                            <el-dropdown-menu slot="dropdown">
                                <el-radio-group v-model="queryInfo.onlyme" @change="getDataList(1)" class="check_style">
                                    <el-radio :label="1">
                                        <span class="el_check_title">分配给我的</span>
                                        <span class="el-icon-check el_check_icon"></span>
                                    </el-radio>
                                    <el-radio :label="0">
                                        <span class="el_check_title">全部</span>
                                        <span class="el-icon-check el_check_icon"></span>
                                    </el-radio>
                                </el-radio-group>
                            </el-dropdown-menu>
                        </el-dropdown> -->
                        <el-radio-group v-model="queryInfo.onlyme" @change="getDataList(1)" size="mini" class="is_me">
                            <el-radio-button :label="0">全部</el-radio-button>
                            <el-radio-button :label="1" v-if="userInfo.id!=10000">分配给我的</el-radio-button>
                        </el-radio-group>
                        <div class="reset_btn" @click="resetFun">重置</div>
                        <div class="rank_line"></div>
                        <img src="../../assets/img/down_icon.svg" alt="" class="rank_down" :class="{'rank_up':!showrank}" @click="showrank = !showrank">
                    </div>
                    <div class="flexbox flexcenter">
                        <el-select v-model="queryInfo.field" placeholder="请选择" size="small" style="width:110px" class="cust_select">
                            <el-option  label="截至日期" value="closing_date"></el-option>
                            <el-option  label="按ID" value="id"></el-option>
                        </el-select>
                        <div class="icon_btn icon_btn_32" @click="sortFun('desc')" v-if="queryInfo.order==''|| queryInfo.order=='asc'"><img src="../../assets/img/rank_icon.svg" alt=""></div>
                        <div class="icon_btn icon_btn_32 rote_180" @click="sortFun('asc')" v-else><img src="../../assets/img/rank_icon.svg" alt=""></div>
                    </div>
                </div>
            </div>
            <div class="sch_hight flexbox" v-if="showrank">
                <div class="flexbox flexcenter max_width">
                    <el-dropdown :hide-on-click="false" trigger="click" placement='bottom'>
                        <div class="flexbox flexcenter drop_box drop_hover">
                            <span class="drop_text">平面</span>
                            <span class="drop_title">{{designer_text.length>0?designer_text.toString():'全部'}}</span>
                            <span class="el-icon-caret-bottom"></span>
                        </div>
                        <el-dropdown-menu slot="dropdown">
                            <el-input v-model="centreQuery" clearable placeholder="请输入内容" prefix-icon="el-icon-search" style="width:180px" size="small" class="dropdown_input"></el-input>
                            <div class="dropdown_hascheck flexbox flexcenter">
                                <span class="hascheck_num" :class="{'hascheck_num_color':designer_text.length>0}">已选 {{designer_text.length}} 项</span>
                                <div class="rank_line" style="margin:0 10px"></div>
                                <el-link type="primary" :underline="false" @click="clearFilter('designer_text','designer_uid')" v-if="designer_text.length>0">清除已选</el-link>
                            </div>
                            <el-checkbox-group v-model="queryInfo.designer_uid" class="check_style" @change="selectText(optimiList,queryInfo.designer_uid,'designer_text','nickname')">
                                <el-checkbox :label="item.id" v-for="item in filteredData(centreQuery,optimiList,'nickname')" :key='item.id'>
                                    <span class="el_check_title">{{item.nickname}}</span>
                                    <span class="el-icon-check el_check_icon"></span>
                                </el-checkbox>
                            </el-checkbox-group>
                        </el-dropdown-menu>
                    </el-dropdown>
                    <div class="rank_line"></div>
                    <el-dropdown :hide-on-click="false" trigger="click" placement='bottom'>
                        <div class="flexbox flexcenter drop_box drop_hover">
                            <span class="drop_text">截止日期</span>
                            <span class="drop_title">{{data_text.length>0?data_text.toString():'全部'}}</span>
                            <span class="el-icon-caret-bottom"></span>
                        </div>
                        <el-dropdown-menu slot="dropdown">
                            <div class="dropdown_hascheck flexbox flexcenter">
                                <span class="hascheck_num" :class="{'hascheck_num_color':data_text.length>0}">已选 {{data_text.length}} 项</span>
                                <div class="rank_line" style="margin:0 10px"></div>
                                <el-link type="primary" :underline="false" @click="clearFilter('data_text','closing_date')" v-if="data_text.length>0">清除已选</el-link>
                            </div>
                            <el-checkbox-group v-model="queryInfo.closing_date" class="check_style" @change="selectText(dataList,queryInfo.closing_date,'data_text','nickname')">
                                <el-checkbox :label="item.id" v-for="item in filteredData('',dataList,'nickname')" :key='item.id'>
                                    <span class="el_check_title">{{item.nickname}}</span>
                                    <span class="el-icon-check el_check_icon"></span>
                                </el-checkbox>
                            </el-checkbox-group>
                        </el-dropdown-menu>
                    </el-dropdown>
                    <div class="rank_line"></div>
                    <el-dropdown :hide-on-click="false" trigger="click" placement='bottom'>
                        <div class="flexbox flexcenter drop_box drop_hover">
                            <span class="drop_text">裂变类型</span>
                            <span class="drop_title">{{fission_text.length>0?fission_text.toString():'全部'}}</span>
                            <span class="el-icon-caret-bottom"></span>
                        </div>
                        <el-dropdown-menu slot="dropdown">
                            <div class="dropdown_hascheck flexbox flexcenter">
                                <span class="hascheck_num" :class="{'hascheck_num_color':fission_text.length>0}">已选 {{fission_text.length}} 项</span>
                                <div class="rank_line" style="margin:0 10px"></div>
                                <el-link type="primary" :underline="false" @click="clearFilter('fission_text','fission_type')" v-if="fission_text.length>0">清除已选</el-link>
                            </div>
                            <el-checkbox-group v-model="queryInfo.fission_type" class="check_style" @change="selectText(fissionList,queryInfo.fission_type,'fission_text','nickname')">
                                <el-checkbox :label="item.id" v-for="item in filteredData('',fissionList,'nickname')" :key='item.id'>
                                    <span class="el_check_title">{{item.nickname}}</span>
                                    <span class="el-icon-check el_check_icon"></span>
                                </el-checkbox>
                            </el-checkbox-group>
                        </el-dropdown-menu>
                    </el-dropdown>
                    <div class="rank_line"></div>
                    <el-dropdown :hide-on-click="false" trigger="click" placement='bottom'>
                        <div class="flexbox flexcenter drop_box drop_hover">
                            <span class="drop_text">品牌</span>
                            <span class="drop_title">{{queryInfo.brand_name?queryInfo.brand_name:'全部'}}</span>
                            <span class="el-icon-caret-bottom"></span>
                        </div>
                        <el-dropdown-menu slot="dropdown">
                            <el-input v-model="queryInfo.brand_name" @change="getDataList(1)" clearable placeholder="请输入品牌名称" prefix-icon="el-icon-search" style="width:180px" size="small" class="dropdown_input"></el-input>
                        </el-dropdown-menu>
                    </el-dropdown>
                    <div class="rank_line"></div>
                    <el-dropdown :hide-on-click="false" trigger="click" placement='bottom'>
                        <div class="flexbox flexcenter drop_box drop_hover">
                            <span class="drop_text">产品</span>
                            <span class="drop_title">{{queryInfo.product_name?queryInfo.product_name:'全部'}}</span>
                            <span class="el-icon-caret-bottom"></span>
                        </div>
                        <el-dropdown-menu slot="dropdown">
                            <el-input v-model="queryInfo.product_name" @change="getDataList(1)" clearable placeholder="请输入产品名称" prefix-icon="el-icon-search" style="width:180px" size="small" class="dropdown_input"></el-input>
                        </el-dropdown-menu>
                    </el-dropdown>

                    <template v-if="addrank[0].check">
                        <div class="rank_line"></div>
                        <el-dropdown :hide-on-click="false" trigger="click" placement='bottom'>
                            <div class="flexbox flexcenter drop_box drop_hover">
                                <span class="close_drop el-icon-error" @click.stop="deletRank(0)"></span>
                                <span class="drop_text">业务场景</span>
                                <span class="drop_title">{{business_text.length>0?business_text.toString():'全部'}}</span>
                                <span class="el-icon-caret-bottom"></span>
                            </div>
                            <el-dropdown-menu slot="dropdown">
                                <div class="dropdown_hascheck flexbox flexcenter">
                                    <span class="hascheck_num" :class="{'hascheck_num_color':business_text.length>0}">已选 {{business_text.length}} 项</span>
                                    <div class="rank_line" style="margin:0 10px"></div>
                                    <el-link type="primary" :underline="false" @click="clearFilter('business_text','business_scene')" v-if="business_text.length>0">清除已选</el-link>
                                </div>
                                <el-checkbox-group v-model="queryInfo.business_scene" class="check_style" @change="selectText(businessList,queryInfo.business_scene,'business_text','nickname')">
                                    <el-checkbox :label="item.id" v-for="item in filteredData('',businessList,'nickname')" :key='item.id'>
                                        <span class="el_check_title">{{item.nickname}}</span>
                                        <span class="el-icon-check el_check_icon"></span>
                                    </el-checkbox>
                                </el-checkbox-group>
                            </el-dropdown-menu>
                        </el-dropdown>
                    </template>

                    <template v-if="addrank[1].check">
                        <div class="rank_line"></div>
                        <el-dropdown :hide-on-click="false" trigger="click" placement='bottom'>
                            <div class="flexbox flexcenter drop_box drop_hover">
                                <span class="close_drop el-icon-error" @click.stop="deletRank(1)"></span>
                                <span class="drop_text">审核状态</span>
                                <span class="drop_title">{{verify_text.length>0?verify_text.toString():'全部'}}</span>
                                <span class="el-icon-caret-bottom"></span>
                            </div>
                            <el-dropdown-menu slot="dropdown">
                                <div class="dropdown_hascheck flexbox flexcenter">
                                    <span class="hascheck_num" :class="{'hascheck_num_color':verify_text.length>0}">已选 {{verify_text.length}} 项</span>
                                    <div class="rank_line" style="margin:0 10px"></div>
                                    <el-link type="primary" :underline="false" @click="clearFilter('verify_text','verify_status')" v-if="verify_text.length>0">清除已选</el-link>
                                </div>
                                <el-checkbox-group v-model="queryInfo.verify_status" class="check_style" @change="selectText(verifyList,queryInfo.verify_status,'verify_text','nickname')">
                                    <el-checkbox :label="item.id" v-for="item in filteredData('',verifyList,'nickname')" :key='item.id'>
                                        <span class="el_check_title">{{item.nickname}}</span>
                                        <span class="el-icon-check el_check_icon"></span>
                                    </el-checkbox>
                                </el-checkbox-group>
                            </el-dropdown-menu>
                        </el-dropdown>
                    </template>

                    <template v-if="addrank[2].check">
                        <div class="rank_line"></div>
                        <el-dropdown :hide-on-click="false" trigger="click" placement='bottom'>
                            <div class="flexbox flexcenter drop_box drop_hover">
                                <span class="close_drop el-icon-error" @click.stop="deletRank(2)"></span>
                                <span class="drop_text">平台</span>
                                <span class="drop_title">{{channel_text.length>0?channel_text.toString():'全部'}}</span>
                                <span class="el-icon-caret-bottom"></span>
                            </div>
                            <el-dropdown-menu slot="dropdown">
                                <div class="dropdown_hascheck flexbox flexcenter">
                                    <span class="hascheck_num" :class="{'hascheck_num_color':channel_text.length>0}">已选 {{channel_text.length}} 项</span>
                                    <div class="rank_line" style="margin:0 10px"></div>
                                    <el-link type="primary" :underline="false" @click="clearFilter('channel_text','channel')" v-if="channel_text.length>0">清除已选</el-link>
                                </div>
                                <el-checkbox-group v-model="queryInfo.channel" class="check_style" @change="selectText(channelList,queryInfo.channel,'channel_text','nickname')">
                                    <el-checkbox :label="item.id" v-for="item in filteredData('',channelList,'nickname')" :key='item.id'>
                                        <span class="el_check_title">{{item.nickname}}</span>
                                        <span class="el-icon-check el_check_icon"></span>
                                    </el-checkbox>
                                </el-checkbox-group>
                            </el-dropdown-menu>
                        </el-dropdown>
                    </template>

                    <template v-if="addrank[3].check">
                        <div class="rank_line"></div>
                        <el-dropdown :hide-on-click="false" trigger="click" placement='bottom'>
                            <div class="flexbox flexcenter drop_box drop_hover">
                                <span class="close_drop el-icon-error" @click.stop="deletRank(3)"></span>
                                <span class="drop_text">核心创意人</span>
                                <span class="drop_title">{{queryInfo.centre_name?queryInfo.centre_name:'全部'}}</span>
                                <span class="el-icon-caret-bottom"></span>
                            </div>
                            <el-dropdown-menu slot="dropdown">
                                <el-input v-model="queryInfo.centre_name" @change="getDataList(1)" clearable placeholder="请输入核心创意人" prefix-icon="el-icon-search" style="width:180px" size="small" class="dropdown_input"></el-input>
                            </el-dropdown-menu>
                        </el-dropdown>
                    </template>

                    <template v-if="addrank[4].check">
                        <div class="rank_line"></div>
                        <el-dropdown :hide-on-click="false" trigger="click" placement='bottom'>
                            <div class="flexbox flexcenter drop_box drop_hover">
                                <span class="close_drop el-icon-error" @click.stop="deletRank(4)"></span>
                                <span class="drop_text">标签</span>
                                <span class="drop_title">{{tag_text.length>0?tag_text.toString():'全部'}}</span>
                                <span class="el-icon-caret-bottom"></span>
                            </div>
                            <el-dropdown-menu slot="dropdown">
                                <div class="dropdown_hascheck flexbox flexcenter">
                                    <span class="hascheck_num" :class="{'hascheck_num_color':tag_text.length>0}">已选 {{tag_text.length}} 项</span>
                                    <div class="rank_line" style="margin:0 10px"></div>
                                    <el-link type="primary" :underline="false" @click="clearFilter('tag_text','tag')" v-if="tag_text.length>0">清除已选</el-link>
                                </div>
                                <el-checkbox-group v-model="queryInfo.tag" class="check_style" @change="selectText(tag_list,queryInfo.tag,'tag_text','name')">
                                    <el-checkbox :label="item.id" v-for="item in filteredData('',tag_list,'name')" :key='item.id'>
                                        <span class="el_check_title">{{item.name}}</span>
                                        <span class="el-icon-check el_check_icon"></span>
                                    </el-checkbox>
                                </el-checkbox-group>
                            </el-dropdown-menu>
                        </el-dropdown>
                    </template>

                    <div class="rank_line"></div>
                    <el-dropdown :hide-on-click="false" trigger="click" placement='bottom'>
                        <div class="flexbox flexcenter drop_box drop_hover">
                            <span class="drop_text">+ 筛选</span>
                            <span class="el-icon-caret-bottom"></span>
                        </div>
                        <el-dropdown-menu slot="dropdown">
                            <ul class="demand_rank">
                                <li v-for="(item,index) in addrank" :key="index">
                                    <el-checkbox v-model="item.check" @change="changeRank(item.check,index)">{{item.name}}</el-checkbox>
                                </li>
                            </ul>
                        </el-dropdown-menu>
                    </el-dropdown>
                    <template v-if="queryInfo.id.length>0">
                        <div class="rank_line"></div>
                        <el-tag type="info" size="small" closable @close="tagClose()">
                            原需求：{{queryInfo.id.toString()}}
                        </el-tag>
                    </template>
                </div>
                <div class="input_width">
                    <el-input style="width:216px;margin-left:5px" clearable size="small" placeholder="素材名称，ID" suffix-icon="el-icon-search" @change="getDataList(1)" v-model="queryInfo.query">
                    </el-input>
                </div>
            </div>
        </div>
        <div class="com_box" style="margin-top:12px" v-loading="loading" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0)">
            <div class="table_box">
                <el-table :data="tableData" class="com_table" height="700px">
                    <div slot="empty" class="flexbox flexcenter flexcolumn flexjust" style="height:300px">
                        <img src="../../assets/img/null_icon.svg" alt="">
                        <div class="font_13 color_03">暂无数据</div>
                    </div>
                    <el-table-column prop="id" label="ID" min-width="120">
                    </el-table-column>
                    <el-table-column prop="" label="品牌/产品" width="130">
                        <template slot-scope="scope">
                            <div class="table_brand">{{scope.row.brand_name}}</div>
                            <div class="table_product">{{scope.row.product_name}}</div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="description" label="需求信息" width="100">
                        <template slot-scope="scope">
                            <div class="icon_btn icon_btn_32 flexbox flexcenter" @click="viewPictureInfo(scope.row.description)" v-if="scope.row.description"><img src="../../assets/img/file_icon.svg" alt=""></div>
                            <div class="icon_btn icon_btn_32 flexbox flexcenter" v-else><img src="../../assets/img/file_icon2.svg" alt=""></div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="material" label="素材文件" min-width="200">
                        <template slot-scope="scope">
                            <div class="flexbox flexcenter" style="flex-wrap:wrap">
                                <div v-for="(item,index) in scope.row.material" :key="index">
                                    <el-popover placement="left" title="" width="280" trigger="hover" content="">
                                        <div style="width:100%;height:500px">
                                            <img :src="item.url" alt="" style="width:100%;height:500px">
                                        </div>
                                        <div class="add_sche flexbox flexcenter" style="margin-top:3px" slot="reference" @click="pictureDetailsSz(scope.row.id)"><img :src="item.url" alt="" style="height:100%"></div>
                                    </el-popover>
                                </div>

                                <div class="add_sche flexbox flexcenter" style="margin-top:3px" @click="editPictureSz(scope.row)" v-if="scope.row.sync_status!=1"><img src="../../assets/img/add_sch.svg" alt=""></div>
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="remark" label="素材标签" min-width="270">
                        <template slot-scope="scope">
                            <div class="flexbox flexcenter remark_hover">
                                <template v-if="scope.row.tag.length>0">
                                    <div class="tag_context">{{scope.row.tag.map((item=>{return item.name})).join('/')}}</div>
                                </template>
                                <template v-else>
                                    --
                                </template>
                                <span class="icon_btn flexbox flexcenter flexjust">
                                    <img src="../../assets/img/edit_icon2.svg" alt="" @click="addMaterialTag(scope.row,2)">
                                </span>
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="fission_type" label="裂变类型" width="100">
                        <template slot-scope="scope">
                            <el-link v-if="scope.row.fission_type==1" @click="fissionRecordPicture(scope.row)">修改</el-link>
                            <el-link v-else-if="scope.row.fission_type==2" @click="fissionRecordPicture(scope.row)">调整</el-link>
                            <span v-else>--</span>
                        </template>
                    </el-table-column>
                    <el-table-column prop="business_scene" label="业务场景" width="170">
                        <template slot-scope="scope">
                            <SceneModel :sceneTyle="scope.row"/>
                        </template>
                    </el-table-column>
                    <el-table-column prop="closing_date" label="截止日期" width="130">
                        <template slot-scope="scope">
                            <DaysModel :daysTyle="scope.row"/>
                        </template>
                    </el-table-column>
                    <el-table-column prop="verify_status" label="审核状态" width="100">
                        <template slot-scope="scope">
                            <div class="flexbox flexcenter" v-if="scope.row.verify_status==0">
                                <span class="text_gray">暂无</span>
                            </div>
                            <template v-else>
                                <el-popover placement="top" trigger="hover">
                                    <div class="tips_content" v-html="scope.row.reject_reason">

                                    </div>
                                    <div class="flexbox flexcenter" slot="reference">
                                        <span class="text_red" style="margin-right:5px">卡审</span>
                                        <img src="../../assets/img/reson_icon.svg" alt="">
                                    </div>
                                </el-popover>
                            </template>
                        </template>
                    </el-table-column>
                    <el-table-column prop="centre_name" label="核心创意人" width="130" show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column prop="designer_name" label="平面" width="100" show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column prop="material_name" label="素材名称" min-width="200" show-overflow-tooltip>
                        <template slot-scope="scope" slot="header">
                            <div class="flexbox flexcenter">
                                素材名称
                                <el-tooltip content="JC_品牌_产品_核心创意人_剪辑_渠道类型_唯一码_上传日期" placement="top">
                                    <i class="el-icon-question" style="margin-left:5px;color:#616C85"></i>
                                </el-tooltip>
                            </div>
                        </template>
                        <template slot-scope="scope">
                            <template v-if="scope.row.material_name">
                                <el-tooltip content="复制" placement="top">
                                    <el-link :underline="false" icon="el-icon-document-copy" @click="copy(scope.row.material_name)"></el-link>
                                </el-tooltip>
                                {{scope.row.material_name}}
                            </template>
                            <template v-else>
                                --
                            </template>
                        </template>
                    </el-table-column>
                    <el-table-column prop="remark" label="备注" min-width="150" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <el-input v-model="scope.row.remark" placeholder="" @blur="editRemark(scope.row,scope.$index)" v-focus size="mini" v-if="scope.row.remarkshow"></el-input>
                            <div class="flexbox flexcenter remark_hover" v-else>{{scope.row.remark?scope.row.remark:'--'}}<span class="icon_btn flexbox flexcenter flexjust" v-if="scope.row.sync_status!=1"><img src="../../assets/img/edit_icon2.svg" alt="" @click="showRemark(scope.$index)"></span></div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="product_num" label="操作" width="180" align="center" fixed="right">
                        <template slot-scope="scope">
                            <template v-if="scope.row.status==1">
                                <el-tooltip class="item" effect="dark" content="上传图片" placement="top">
                                    <el-button type="primary" circle size="small" class="icon_btn" :disabled="scope.row.sync_status==1" @click="editPictureSz(scope.row)">
                                        <svg width="32" height="33" viewBox="0 0 32 33" fill="none" xmlns="http://www.w3.org/2000/svg">
                                            <circle cx="16" cy="16.5" r="16" fill="#A5B1D1" fill-opacity="0.08" />
                                            <path fill-rule="evenodd" clip-rule="evenodd" d="M11.0838 13.9076C11.144 13.9925 11.1894 14.09 11.2153 14.1973C11.3243 14.6494 11.0462 15.1043 10.5941 15.2134C8.93253 15.6141 7.68421 17.1353 7.68421 18.9627C7.68421 21.1019 9.39108 22.8158 11.4718 22.8158C11.8309 22.8158 12.1769 22.7652 12.5042 22.6711C12.9511 22.5426 13.4177 22.8008 13.5462 23.2478C13.6747 23.6948 13.4165 24.1613 12.9695 24.2898C12.4926 24.4269 11.9899 24.5 11.4718 24.5C8.43868 24.5 6 22.0096 6 18.9627C6 16.6533 7.39867 14.6671 9.39588 13.838C9.69808 10.7931 12.4549 8.5 15.6842 8.5C18.9135 8.5 21.6703 10.7931 21.9725 13.8379C23.9698 14.6671 25.3684 16.6533 25.3684 18.9627C25.3684 22.0096 22.9298 24.5 19.8966 24.5C19.3785 24.5 18.8758 24.4269 18.3989 24.2898C17.9519 24.1613 17.6938 23.6948 17.8223 23.2478C17.9508 22.8008 18.4173 22.5426 18.8643 22.6711C19.1915 22.7652 19.5375 22.8158 19.8966 22.8158C21.9774 22.8158 23.6842 21.1019 23.6842 18.9627C23.6842 17.1353 22.4359 15.6141 20.7743 15.2134C20.3222 15.1043 20.0441 14.6494 20.1532 14.1973C20.179 14.09 20.2244 13.9925 20.2846 13.9076C20.021 11.8592 18.1166 10.1842 15.6842 10.1842C13.2519 10.1842 11.3474 11.8592 11.0838 13.9076Z" fill="#4475FF" />
                                            <path fill-rule="evenodd" clip-rule="evenodd" d="M16.2332 14.1726C15.918 13.9062 15.4561 13.9074 15.1424 14.1756L12.2364 16.6594C11.8828 16.9616 11.8412 17.4932 12.1434 17.8467C12.4456 18.2003 12.9771 18.2419 13.3307 17.9397L14.8888 16.6079V21.9736C14.8888 22.4387 15.2658 22.8157 15.7309 22.8157C16.196 22.8157 16.573 22.4387 16.573 21.9736V16.6652L18.1346 17.9852C18.4898 18.2854 19.0212 18.2409 19.3214 17.8857C19.6216 17.5305 19.5771 16.9992 19.2219 16.6989L16.2332 14.1726Z" fill="#96B1FD" />
                                        </svg>
                                    </el-button>
                                </el-tooltip>
                                <el-tooltip class="item" effect="dark" content="同步素材库" placement="top">
                                    <el-button type="primary" circle size="small" class="icon_btn" :disabled="scope.row.material.length==0 || scope.row.sync_status==1" @click="syncMaterial(scope.row)">
                                        <svg width="32" height="33" viewBox="0 0 32 33" fill="none" xmlns="http://www.w3.org/2000/svg">
                                            <circle cx="16" cy="16.5" r="16" fill="#A5B1D1" fill-opacity="0.08" />
                                            <path d="M22 14.5H10L14 10.5" stroke="#4475FF" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" />
                                            <path opacity="0.5" d="M10 17.5H22L18 21.5" stroke="#4475FF" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" />
                                        </svg>
                                    </el-button>
                                </el-tooltip>
                                <el-dropdown style="margin-left:12px">
                                    <el-button type="primary" circle size="small" class="icon_btn">
                                        <svg width="32" height="33" viewBox="0 0 32 33" fill="none" xmlns="http://www.w3.org/2000/svg">
                                            <circle cx="16" cy="16.5" r="16" fill="#A5B1D1" fill-opacity="0.08" />
                                            <path fill-rule="evenodd" clip-rule="evenodd" d="M17.5 11.5C17.5 12.3284 16.8284 13 16 13C15.1716 13 14.5 12.3284 14.5 11.5C14.5 10.6716 15.1716 10 16 10C16.8284 10 17.5 10.6716 17.5 11.5ZM16 23C16.8284 23 17.5 22.3284 17.5 21.5C17.5 20.6716 16.8284 20 16 20C15.1716 20 14.5 20.6716 14.5 21.5C14.5 22.3284 15.1716 23 16 23Z" fill="#4475FF" />
                                            <path opacity="0.5" d="M17.5 16.5C17.5 17.3284 16.8284 18 16 18C15.1716 18 14.5 17.3284 14.5 16.5C14.5 15.6716 15.1716 15 16 15C16.8284 15 17.5 15.6716 17.5 16.5Z" fill="#4475FF" />
                                        </svg>
                                    </el-button>
                                    <el-dropdown-menu slot="dropdown">
                                        <el-dropdown-item @click.native="editPictureBase(scope.row)" :disabled="scope.row.sync_status==1">
                                            <div class="flexbox flexcenter">
                                                <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                    <path d="M3 17H17" stroke="#616C85" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" />
                                                    <path d="M4 11.14V14H6.87461L15 5.87104L12.1302 3L4 11.14Z" stroke="#616C85" stroke-width="1.6" stroke-linejoin="round" />
                                                </svg>

                                                <span class="font_14 color_01" style="margin-left:5px">基础信息</span>
                                            </div>
                                        </el-dropdown-item>
                                        <el-dropdown-item @click.native="fissionPictureSz(scope.row)" :disabled='scope.row.fission_type !=0'>
                                            <div class="flexbox flexcenter">
                                                <img src="../../assets/img/split_icon.svg" alt="">
                                                <span class="font_14 color_01" style="margin-left:5px">裂变</span>
                                            </div>
                                        </el-dropdown-item>
                                        <el-dropdown-item @click.native="deletPictureSz(scope.row)" v-if="scope.row.sync_status==0">
                                            <div class="flexbox flexcenter">
                                                <img src="../../assets/img/del_icon.svg" alt="">
                                                <span class="font_14 color_01" style="margin-left:5px">废弃</span>
                                            </div>
                                        </el-dropdown-item>
                                    </el-dropdown-menu>
                                </el-dropdown>
                                <!-- <el-button type="text" :underline="false" @click="justPictureSz(scope.row)" :disabled="scope.row.sync_status==1">编辑</el-button>
                                <el-button type="text" :underline="false" style="margin:0 5px" :disabled="scope.row.material.length==0 || scope.row.sync_status==1" @click="syncMaterial(scope.row)">同步素材库</el-button>
                                <el-dropdown style="margin-left:5px">
                                    <el-button type="text" style="padding:0" icon="el-icon-more" class="role_icon"></el-button>
                                    <el-dropdown-menu slot="dropdown">
                                        <el-dropdown-item @click.native="fissionPictureSz(scope.row)" :disabled='scope.row.fission_type !=0'>
                                            <div class="flexbox flexcenter">
                                                <img src="../../assets/img/split_icon.svg" alt="">
                                                <span class="font_14 color_01" style="margin-left:5px">裂变</span>
                                            </div>
                                        </el-dropdown-item>
                                        <el-dropdown-item @click.native="deletPictureSz(scope.row)" v-if="scope.row.sync_status==0">
                                            <div class="flexbox flexcenter">
                                                <img src="../../assets/img/del_icon.svg" alt="">
                                                <span class="font_14 color_01" style="margin-left:5px">废弃</span>
                                            </div>
                                        </el-dropdown-item>
                                    </el-dropdown-menu>
                                </el-dropdown> -->
                            </template>
                            <template v-else-if="scope.row.status==-1">
                                <el-button type="text" disabled>已作废</el-button>
                            </template>
                        </template>
                    </el-table-column>
                </el-table>
            </div>
            <div class="page_box flexbox flexcenter" v-if="total>0">
                <el-pagination background layout="total, prev, pager, next,sizes" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryInfo.page" :page-size="queryInfo.limit" :page-sizes="[20, 50, 100, 200]" :total="total">
                </el-pagination>
            </div>
        </div>
    </div>
</template>

<script>
import {
    dataList,
    businessList,
    verifyList,
    channelList,
    fissionList,
} from "@/assets/js/scheduling";
import AddPictureSingleSz from "./components/AddPictureSingleSz";
import AddPictureMultiSz from "./components/AddPictureMultiSz";
// import JustPictureSz from "./JustPictureSz";
import FissionPictureSz from "./components/FissionPictureSz";
import FissionRecordPicture from "./components/FissionRecordPicture";
import ViewPictureInfo from "./components/ViewPictureInfo";
import AddPictureSz from "./components/AddPictureSz";
import AddSchedTag from "./components/AddSchedTag";
import EditPictureSz from "./components/EditPictureSz";
import EditPictureBase from "./components/EditPictureBase";
import SceneModel from './components/SceneModel'
import DaysModel from './components/DaysModel'
export default {
    name: "",
    data() {
        return {
            queryInfo: {
                userInfo: {},
                year: "",
                week: "",
                page: 1,
                limit: 20,
                query: "",
                closing_date: [],
                centre_uid: [],
                channel: [],
                designer_uid: [],
                centre_name: "",
                brand_name: "",
                product_name: "",
                onlyme: 1,
                field: "closing_date",
                order: "asc",
                executor_uid: [],
                verify_status: [],
                fission_type: [],
                business_scene: [],
                id: [],
                is_all: 0,
                tag: [],
                date_defined: 0,
                date: [],
            },
            loading: false,
            vd_url: "",
            video_status: false,
            yearData: new Date(),
            optimiList: "", //优化师列表
            tag_list: [],
            dataList: [], //日期列表
            fissionList: [],
            businessList: [],
            verifyList: [],
            channelList: [],
            executorQuery: "", //执行人搜索
            centreQuery: "", //编导搜索
            editorQuery: "", //剪辑搜索
            executor_text: [], //已选执行人
            centre_text: [], //已选编导
            editor_text: [], //已选剪辑
            designer_text: [], //已选平面
            data_text: [], //已选截止日期
            fission_text: [], //已选裂变类型
            business_text: [], //已选业务场景
            verify_text: [], //已选审核状态
            channel_text: [], //已选平台
            tag_text: [], //已选标签
            tabindex: 1,
            showrank: true,
            addrank: [
                {
                    check: false,
                    name: "业务场景",
                },
                {
                    check: false,
                    name: "审核状态",
                },
                {
                    check: false,
                    name: "平台",
                },
                {
                    check: false,
                    name: "核心创意人",
                },
                {
                    check: false,
                    name: "标签",
                },
            ], // 添加筛选
            currActive: 1,
            total: 1,
            setpage: 1,
            tableData: [],
        };
    },
    created() {
        this.dataList = dataList;
        this.businessList = businessList;
        this.channelList = channelList;
        this.verifyList = verifyList;
        this.fissionList = fissionList;
        this.userInfo = JSON.parse(window.localStorage.getItem("userinfo"));
        let dayTime = this.$route.query.day
            ? JSON.parse(this.$route.query.day)
            : "";
        this.yearData = dayTime ? new Date(dayTime) : new Date();
        // this.queryInfo.week = dayTime
        //     ? this.getYearWeek(new Date(dayTime))
        //     : this.getYearWeek(new Date());
        this.queryInfo.week = dayTime? this.dayjs(new Date(dayTime)).week():this.dayjs().week();
        this.queryInfo.year = dayTime
            ? this.dateFormat("YYYY", new Date(dayTime))
            : this.dateFormat("YYYY", new Date());
        let aobj = JSON.parse(
            window.sessionStorage.getItem("schedulingPicture")
        );
        if (aobj) {
            this.queryInfo.year = aobj.year;
            this.queryInfo.week = aobj.week;
            this.queryInfo.page = aobj.page;
            this.yearData = aobj.yearData;
        }
        this.getWeekTime()
        this.getDataList(this.queryInfo.page);
        this.getOptimization();
        this.getTagList();
    },
    beforeDestroy() {
        window.sessionStorage.removeItem("schedulingPicture");
    },
    methods: {
        getWeekTime() {
            const one_day = 86400000;
            const date = new Date();
            const day = date.getDay()+1;
            date.setHours(0);
            date.setMinutes(0);
            date.setSeconds(0);
            date.setMilliseconds(0);
            const week_start_time = date.getTime() - (day - 1) * one_day;
            const week_end_time = date.getTime() + (7 - day) * one_day;
            let start_time = this.formatNowDate(week_start_time)
            let end_time = this.formatNowDate(week_end_time)
            this.queryInfo.date = [start_time,end_time]
        },

        formatNowDate(time) {
            let date = new Date(time);
            var myyear = date.getFullYear();
            var mymonth =
                date.getMonth() + 1 < 10
                    ? "0" + (date.getMonth() + 1)
                    : date.getMonth() + 1;
            var myweekday =
                date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
            let day_start = myyear + "-" + mymonth + "-" + myweekday;
            return day_start;
        },

        //获取列表
        async getDataList(page) {
            this.queryInfo.page = page;
            if (this.userInfo.id == 10000) {
                this.queryInfo.onlyme = 0;
            }
            this.loading = true;
            const { data: res } = await this.$http.post(
                "adminapi/Demandszv2/pictureList",
                this.queryInfo
            );
            if (res.code !== 200) {
                this.loading = false;
                this.$message.error(res.msg);
                return;
            } else {
                this.loading = false;
                for (let i in res.data.list) {
                    res.data.list[i].remarkshow = false;
                }
                this.tableData = res.data.list;
                this.total = res.data.count;
            }
        },

        // 筛选
        filteredData(query, list, name) {
            var list = list,
                query = query;

            if (!query) {
                return list;
            }
            query = query.trim();

            list = list.filter(function (item) {
                if (item[name].indexOf(query) !== -1) {
                    return item;
                }
            });
            return list;
        },

        //获取标签列表
        async getTagList() {
            const { data: res } = await this.$http.post(
                "adminapi/materialv2/tagList",
                {
                    page: 1,
                    limit: 0,
                }
            );
            if (res.code !== 200) {
                this.loading = false;
                this.$message.error(res.msg);
                return;
            } else {
                this.tag_list = res.data.list;
            }
        },

        // 获取平面设计师列表
        async getOptimization() {
            const { data: res } = await this.$http.post(
                "adminapi/company/szGraphicList"
            );
            if (res.code !== 200) {
                this.$message.error(res.msg);
                return;
            } else {
                this.optimiList = res.data;
            }
        },

        getData() {
            // this.queryInfo.week = this.getYearWeek(new Date(this.yearData));
            this.queryInfo.week = this.dayjs(this.yearData).week()
            this.queryInfo.year = this.dateFormat(
                "YYYY",
                new Date(this.yearData)
            );
            this.getDataList(1);
            this.setSessionStorage();
        },

        getYearWeek(date) {
            date = this.dateFormat("YYYY-mm-dd", date); //将日期转换成yyyy-mm-dd格式
            date = new Date(date);
            let d = "";
            var date2 = new Date(date.getFullYear(), 0, 1);
            var day1 = date.getDay();
            if (day1 == 0) day1 = 7;
            var day2 = date2.getDay();
            if (day2 == 0) day2 = 7;
            d = Math.round(
                (date.getTime() -
                    date2.getTime() +
                    (day2 - day1) * (24 * 60 * 60 * 1000)) /
                    86400000
            );
            return Math.ceil(d / 7);
        },

        // 日期格式化
        dateFormat(fmt, date) {
            let ret;
            const opt = {
                "Y+": date.getFullYear().toString(), // 年
                "m+": (date.getMonth() + 1).toString(), // 月
                "d+": date.getDate().toString(), // 日
                "H+": date.getHours().toString(), // 时
                "M+": date.getMinutes().toString(), // 分
                "S+": date.getSeconds().toString(), // 秒
                // 有其他格式化字符需求可以继续添加，必须转化成字符串
            };
            for (let k in opt) {
                ret = new RegExp("(" + k + ")").exec(fmt);
                if (ret) {
                    fmt = fmt.replace(
                        ret[1],
                        ret[1].length == 1
                            ? opt[k]
                            : opt[k].padStart(ret[1].length, "0")
                    );
                }
            }
            return fmt;
        },

        // 筛选
        selectText(list, id, text, name) {
            let has_checked = [];
            list.forEach((element) => {
                id.forEach((val) => {
                    if (element.id == val) {
                        has_checked.push(element[name]);
                    }
                });
            });
            this[text] = has_checked;
            this.getDataList(1);
        },

        // 清除已选
        clearFilter(text, id) {
            this.queryInfo[id] = [];
            this[text] = [];
            this.getDataList(1);
        },

        // 创建单需求
        addPictureSingleSz() {
            const attr = {
                dialogVsb: true,
                week: this.queryInfo.week,
                year: this.queryInfo.year,
            };
            this.$bus.emit("addPictureSingleSz", attr);
        },

        // 创建多需求
        addPictureMultiSz() {
            const attr = {
                dialogVsb: true,
                week: this.queryInfo.week,
                year: this.queryInfo.year,
            };
            this.$bus.emit("addPictureMultiSz", attr);
        },

        // 查看需求信息
        viewPictureInfo(info) {
            const attr = {
                dialogVsb: true,
                info: info,
            };
            this.$bus.emit("viewPictureInfo", attr);
        },

        // 添加图片
        addPictureSz(row) {
            const attr = {
                id: row.id,
                centre_uid: row.centre_uid,
                material: row.material,
                dialogVsb: true,
            };
            this.$bus.emit("addPictureSz", attr);
        },

        // 调整
        justPictureSz(row) {
            const attr = {
                brand_name: row.brand_name,
                product_name: row.product_name,
                business_scene: row.business_scene,
                designer_uid: row.designer_uid,
                closing_date: row.closing_date,
                description: row.description,
                id: row.id,
                brand_id: row.brand_id,
                product_id: row.product_id,
                material_finish: row.material_finish,
                dialogVsb: true,
            };
            this.$bus.emit("justPictureSz", attr);
        },

        // 上传图片
        editPictureSz(row) {
            const attr = {
                brand_name: row.brand_name,
                product_name: row.product_name,
                business_scene: row.business_scene,
                designer_uid: row.designer_uid,
                id: row.id,
                brand_id: row.brand_id,
                product_id: row.product_id,
                material: row.material,
                dialogVsb: true,
            };
            this.$bus.emit("editPictureSz", attr);
        },


        // 编辑基本信息
        editPictureBase(row){
            this.$refs.baseRef.dialogVisible = true
            this.$refs.baseRef.editPictureBaseForm.id = row.id
            this.$refs.baseRef.editPictureBaseForm.closing_date = row.closing_date
            this.$refs.baseRef.editPictureBaseForm.description = row.description
        },

        // 裂变
        fissionPictureSz(row) {
            const attr = {
                brand_name: row.brand_name,
                product_name: row.product_name,
                business_scene: row.business_scene,
                id: row.id,
                dialogVsb: true,
            };
            this.$bus.emit("fissionPictureSz", attr);
        },

        // 作废
        deletPictureSz(row) {
            this.$confirm("请问是否要作废", "作废", {
                confirmButtonText: "确认",
                cancelButtonText: "取消",
            })
                .then(async () => {
                    const { data: res } = await this.$http.post(
                        "adminapi/Demandszv2/pictureCancel",
                        {
                            id: row.id,
                        }
                    );
                    if (res.code !== 200) {
                        this.$message.error(res.msg);
                        return;
                    } else {
                        this.$message({
                            type: "success",
                            message: "作废成功",
                        });
                        this.getDataList(this.setpage);
                    }
                })
                .catch(() => {});
        },

        // 删除筛选
        deletRank(index) {
            this.addrank[index].check = false;
            if (index == 0) {
                this.business_text = [];
                this.queryInfo.business_scene = [];
            } else if (index == 1) {
                this.verify_text = [];
                this.queryInfo.verify_status = [];
            } else if (index == 2) {
                this.channel_text = [];
                this.queryInfo.channel = [];
            } else if (index == 3) {
                this.queryInfo.centre_name = "";
            } else if (index == 4) {
                this.queryInfo.tag = "";
            }
            this.getDataList(1);
        },
        changeRank(val, index) {
            if (!val) {
                if (index == 0) {
                    this.business_text = [];
                    this.queryInfo.business_scene = [];
                } else if (index == 1) {
                    this.verify_text = [];
                    this.queryInfo.verify_status = [];
                } else if (index == 2) {
                    this.channel_text = [];
                    this.queryInfo.channel = [];
                } else if (index == 3) {
                    this.queryInfo.centre_name = "";
                } else if (index == 4) {
                    this.queryInfo.tag = "";
                }
                this.getDataList(1);
            }
        },

        // 备注
        showRemark(index) {
            this.tableData[index].remarkshow = true;
        },
        async editRemark(row, index) {
            const { data: res } = await this.$http.post(
                "adminapi/Demandszv2/pictureRemark",
                {
                    id: row.id,
                    remark: row.remark,
                }
            );
            if (res.code !== 200) {
                this.$message.error(res.msg);
                return;
            } else {
                this.$message({
                    message: "修改成功",
                    type: "success",
                });
                this.tableData[index].remarkshow = false;
                this.getDataList(this.setpage);
            }
        },

        // 同步到素材库
        syncMaterial(row) {
            this.$confirm("请问是否同步到素材库", "同步素材库", {
                confirmButtonText: "确认",
                cancelButtonText: "取消",
            })
                .then(async () => {
                    this.loading = true;
                    const { data: res } = await this.$http.post(
                        "adminapi/Demandszv2/pictureSyncMaterial",
                        {
                            sch_id: row.id,
                        }
                    );
                    if (res.code !== 200) {
                        this.loading = false;
                        this.$message({
                            dangerouslyUseHTMLString: true,
                            type: "error",
                            message: res.msg,
                        });
                        return;
                    } else {
                        this.loading = false;
                        this.$message({
                            type: "success",
                            message: "同步成功",
                        });
                        this.getDataList(this.setpage);
                    }
                })
                .catch(() => {});
        },

        // 复制
        copy(text) {
            let url = text;
            let oInput = document.createElement("input");
            oInput.value = url;
            document.body.appendChild(oInput);
            oInput.select(); // 选择对象;
            document.execCommand("Copy"); // 执行浏览器复制命令
            this.$message({
                message: "复制成功",
                type: "success",
            });
            oInput.remove();
        },

        // 跳转
        switchTab(path) {
            this.$router.push({
                path: path,
                query: {
                    day: JSON.stringify(this.yearData),
                },
            });
        },

        // 裂变记录
        fissionRecordPicture(row) {
            const attr = {
                fission_type: row.fission_type,
                id: row.id,
                dialogVsb: true,
            };
            this.$bus.emit("fissionRecordPicture", attr);
        },

        // 剪辑素材详情
        pictureDetailsSz(id) {
            let routeUrl = this.$router.resolve({
                path: "/picturedetailsszv2",
                query: {
                    id: id,
                },
            });
            window.open(routeUrl.href, "_blank");
        },

        // 添加标签
        addMaterialTag(item, type) {
            this.$refs.tagRef.dialogVisible = true;
            this.$refs.tagRef.type = type;
            this.$refs.tagRef.has_tag = JSON.parse(JSON.stringify(item.tag));
            this.$refs.tagRef.addMaterialTagForm.id = item.id;
            this.$refs.tagRef.addMaterialTagForm.tag = item.tag.map((it) => {
                return it.id;
            });
        },

        // 排序
        sortFun(val) {
            this.queryInfo.order = val;
            this.getDataList(1);
        },

        // 关闭原需求
        tagClose() {
            this.queryInfo.id = [];
            this.queryInfo.is_all = 0;
            this.getDataList(1);
        },

        // 重置
        resetFun() {
            this.queryInfo.query = "";
            this.queryInfo.closing_date = [];
            this.queryInfo.centre_uid = [];
            this.queryInfo.channel = [];
            this.queryInfo.brand_name = "";
            this.queryInfo.product_name = "";
            this.queryInfo.onlyme = 0;
            this.queryInfo.field = "closing_date";
            this.queryInfo.order = "asc";
            this.queryInfo.executor_uid = [];
            this.queryInfo.verify_status = [];
            this.queryInfo.fission_type = [];
            this.queryInfo.business_scene = [];
            this.queryInfo.designer_uid = [];
            this.queryInfo.tag = [];
            this.queryInfo.id = [];
            this.executorQuery = "";
            this.centreQuery = "";
            this.editorQuery = "";
            this.executor_text = [];
            this.centre_text = [];
            this.editor_text = [];
            this.designer_text = [];
            this.data_text = [];
            this.fission_text = [];
            this.business_text = [];
            this.verify_text = [];
            this.channel_text = [];
            this.tag_text = [];
            this.getDataList(1);
        },

        // 每页显示多少条数据
        handleSizeChange(val) {
            this.queryInfo.limit = val;
            this.getDataList(1);
        },
        // 当前页切换
        handleCurrentChange(val) {
            this.setpage = val;
            this.getDataList(val);
            this.setSessionStorage();
        },

        setSessionStorage() {
            let info = {
                year: this.queryInfo.year,
                week: this.queryInfo.week,
                page: this.queryInfo.page,
                yearData: this.yearData,
            };
            window.sessionStorage.setItem(
                "schedulingPicture",
                JSON.stringify(info)
            );
        },
    },
    components: {
        AddPictureSingleSz,
        AddPictureMultiSz,
        // JustPictureSz,
        FissionPictureSz,
        FissionRecordPicture,
        ViewPictureInfo,
        AddPictureSz,
        AddSchedTag,
        EditPictureSz,
        EditPictureBase,
        SceneModel,
        DaysModel
    },
};
</script>


<style scoped>
.sch_tab {
    height: 71px;
    font-size: 16px;
    color: #616c85;
    line-height: 71px;
    margin-right: 20px;
    position: relative;
    cursor: pointer;
}
.sch_tab::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background-color: #4475ff;
    transition: all 0.3s;
    transform: scaleX(0);
}
.sch_tab.active {
    font-weight: bold;
    color: #17233d;
}
.sch_tab.active::after {
    transform: scaleX(1);
}
.remark_hover .icon_btn {
    display: none;
}
.remark_hover:hover .icon_btn {
    display: flex;
    margin-left: 5px;
}
.tag_context {
    max-width: 200px;
    box-sizing: border-box;
    padding: 0 8px;
    height: 26px;
    line-height: 26px;
    border: 1px solid #ebebeb;
    border-radius: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #616c85;
}
</style>

<style>
.is_me .el-radio-button--mini .el-radio-button__inner {
    padding: 5px 15px;
}
</style>
